<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>医院注册界面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #F2F7FF;
            margin: 0;
            padding: 0;
        }

        .registration-container {
            width: 100%;
            max-width: 400px;
            margin: 100px auto;
            padding: 20px;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }

        h1 {
            text-align: center;
            color: #0066B3;
            margin-bottom: 20px;
        }

        .input-group {
            margin-bottom: 15px;
        }

        label {
            display: block;
            margin-bottom: 5px;
            color: #333;
        }

        input[type="text"], input[type="number"], select, input[type="tel"], input[type="password"] {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        button {
            width: 100%;
            padding: 10px;
            background-color: #0066B3;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        button:hover {
            background-color: #004D8C;
        }

    </style>
</head>
<body>
<div class="registration-container">
    <h1>患者注册</h1>
    <form action="./register" method="post">
        <div class="input-group">
            <label for="name">姓名：</label>
            <input type="text" id="name" name="name" required>
        </div>
        <div class="input-group">
            <label for="gender">性别：</label>
            <select id="gender" name="sex" required>
                <option value="">请选择</option>
                <option value="male">男</option>
                <option value="female">女</option>
            </select>
        </div>
        <div class="input-group">
            <label for="age">年龄：</label>
            <input type="number" id="age" name="age" min="1" max="150" required>
        </div>
        <div class="input-group">
            <label for="id_number">身份证号：</label>
            <input type="text" id="id_number" name="idcard" pattern="\d{17}[\d|x]|[\d]{15}" title="请输入正确的身份证号" required>
        </div>
        <div class="input-group">
            <label for="phone">手机号：</label>
            <input type="tel" id="phone" name="phone" pattern="^1[3-9]\d{9}$" title="请输入正确的手机号" required>
        </div>
        <div class="input-group">
            <label for="username">用户名：</label>
            <input type="text" id="username" name="username" required>
        </div>
        <div class="input-group">
            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required>
        </div>
        <button type="submit">注册</button>
    </form>
</div>
</body>
</html>
